Previous Thread
Next Thread
Print Thread
Rate Thread
#108688 09/03/2001 2:39 AM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
I want to work on replacing the redundant font tags in the templates with some basic css that reads the styles set in the style template and uses those values for the fonts.

Here's what I've done so far:

In public_common.pl, I've set the css to look like this:

Code
code:

I've then went through and replaced all :

with


There are >300 instances of just this one set of tags in the templates - bandwidth and download speed should improve...

My problem is that the pages do not seem to be picking up on these styles, as the text sizes are bigger than specified... ideas? Is it because the ubb uses size="2" instead of pixels or x-small?

I am using IE6 to view the results...


- Allen wavey
- What Drives You?
Sponsored Links
#108689 09/03/2001 2:07 PM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
You can use pixels (like 80pt), percents (like 80%) or x-small/etc..

[ September 03, 2001: Message edited by: LK ]

#108690 09/03/2001 5:44 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
and there lies the rub, since ubb uses 1, 2, and 3 everywhere, it's not gonna be a matter of just reading the already set values in the styles...

ah well... it's just one extra step... should make a nice difference in download speed and bandwidth improvement. I'll add this as part of the xhtml templates or seperately but with using xhtml templates as the base smile


- Allen wavey
- What Drives You?
#108691 09/03/2001 5:48 PM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
BTW, I don't think Xpts are CSS v1.0 validated.

#108692 09/03/2001 7:26 PM
Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
Quote
quote:
80pt would be 80 points, not 80 pixels. wink But in response to Allen's initial question, CSS and HTML font sizes are not the same. CSS needs the number to be accompanied by a unit, and 10pt is roughly a 2 in HTML sizing.

Sponsored Links
#108693 09/03/2001 11:57 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
hmmmm...

thanks, both of ye... that explains the ugly I was seeing smile

Close?:
1 == 8pt == xx-small
2 == 10pt == x-small
3 == 12pt == small

Gonna read a little more at ALA, they had some weird stuff going on to make it appear the same in most all browsers...


I'll distribute the templates with the css manually set, maybe in the future include a control panel add-on that allows you to set it from the cp.


- Allen wavey
- What Drives You?
#108694 09/04/2001 12:15 AM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
more... can I mix css class with other tags?

example... I have a a good number of fonts set that are exactly alike except they give a different text color... can I do something like:



Or do I need a different css class set for each font tag that uses a different color?


- Allen wavey
- What Drives You?
#108695 09/04/2001 5:10 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
without that COLOR part wink

Also, I think STRICT means
, if you want it to be validated.

#108696 04/30/2002 5:56 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
I didn't give up on this (and you thought I was taking a long time on the portal wink ) - I started css'ing the templates for 6.3 and am seeing a ~10% savings in file size which should translate into a significant gain in bandwidth savings. They should be ready when 6.3 goes final smile


- Allen wavey
- What Drives You?
#108697 04/30/2002 6:50 PM
Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
Can you post the CSS you're currently working with? I hope it's not the same as what you posted back in the first post of this thread... smile

Sponsored Links
#108698 04/30/2002 7:12 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
hehe smile

check the thread in the dev forum for more details. will post it publicly as there is more to post smile


- Allen wavey
- What Drives You?
#108699 05/01/2002 3:09 AM
Joined: Apr 2002
Posts: 111
PF Offline
Member
Member
Offline
Joined: Apr 2002
Posts: 111
Not using 6.3, but I did the same thing for UBB6.05 a couple of weeks ago.

Difference being is that I've made it an external stylesheet, and it replaces UBB's "Templates", so you configure everything in the stylesheet.

Anyway, our stylesheet looks like this

[code][/code]The whole template updating took me probably around 5 hours in total to modify.
I would make a hack out of it, but it does require a lot of intelligence when installing other hacks, to make sure they comply with the stylesheet.

Allen, If you want, I can email you our highly modified templates, so you can use them to compare with, to make sure you get all the sections updated.

As far as I can tell i've covered all areas with it smile

Cheers

Ben/PF

#108700 05/01/2002 1:29 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
thanks, it looks good smile

I'll be using 6.3's templates, which are a good bit different from 6.05's in some places, not so bad in others. I'll also be using ubb.threads' css naming scheme with a bit simpler .css file than yours - it'll help tremendously for those switching from one to another and it's one a lot of people (including me wink ) are used to, I know what's where smile

Once I start posting the template files publicly, I would value your input tho, when you have time smile


- Allen wavey
- What Drives You?
#108701 05/09/2002 2:19 AM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
quote:
Originally posted by AllenAyres:
more... can I mix css class with other tags?

example... I have a a good number of fonts set that are exactly alike except they give a different text color... can I do something like:



Or do I need a different css class set for each font tag that uses a different color?

in case you never got this answered, afaik the proper way to go about overriding is like so:



but then i was always under the impression that if you are setting font styles with the td css definitions you do not need any tag at all...

#108702 05/09/2002 6:29 PM
Joined: Sep 2000
Posts: 4,211
Master Hacker
Master Hacker
Joined: Sep 2000
Posts: 4,211
jordo: that code looks good; glad to see you know about how the "cascade" in cascading style sheets works. smile

Allen: use tags instead for doing that.

#108703 05/09/2002 10:21 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
thanks both of you smile


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 413
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 21
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)